import request from "../index";

export default class SortRequest {
  // 获取分类信息
  public static getSort(params) {
    return request({
      url: "/sort",
      params,
      method: "get",
    });
  }

  // 创建分类
  public static addSort(data) {
    return request({
      url: "/sort",
      data,
      method: "post",
    });
  }

  // 修改分类信息
  public static editSort(data) {
    return request({
      url: "/sort",
      data,
      method: "put",
    });
  }

  // 删除分类
  public static deleteSort(params) {
    return request({
      url: "/sort",
      params,
      method: "delete",
    });
  }
  // 获取分类列表
  public static getSortList(params) {
    return request({
      url: "/sort/list",
      params,
      method: "get",
    });
  }
  // 获取全部分类
  public static getAllSort(params) {
    return request({
      url: "/sort/all",
      params,
      method: "get",
    });
  }
}
